<template>
  <div>
    <Form ref="searchForm" :model="params" inline :label-width="120" :label-colon="true">
      <FormItem label="农村名称">
        <Input v-model="params.rfRuralName" placeholder="请输入农村名称"/>
      </FormItem>
      <FormItem label="统计年份">
        <DatePicker
          type="year"
          placeholder="请选择统计年份"
          style="width: 200px"
          format="yyyy"
          v-model="params.statisticsYear"></DatePicker>
      </FormItem>
      <FormItem :label-width="0">
        <Button type="primary" style="margin-right: 10px;" @click="publicGetData(true)">查询</Button>
        <Button type="primary" @click="publicUpdateData">新增</Button>
      </FormItem>
    </Form>
    <Breadcrumb></Breadcrumb>
    <!-- @handleRemove="publicRemoveData" -->
    <BaseTable
      ref="baseTable"
      :columns="columns"
      :action="action.readParty"
      :public-btn="['view', 'update']"
      @handleView="publicUpdateData"
      @handleUpdate="publicUpdateData"
      >
    </BaseTable>
    <Drawer :title="viewParams.title"
      width="500"
      :draggable="true"
      v-model="viewParams.flag"
      @on-visible-change="publicVisibleChange">
      <ruralPartyBranchUpdate
        :type="type"
        :moduleId="id"
        :idName="idName"
        :key="isRefreshView"
        @closeView="publicCloseView"
      ></ruralPartyBranchUpdate>
    </Drawer>
  </div>
</template>
<script>
import { tableMixin } from '@/mixin/index'
import columns from './ruralPartyBranch_columns'
import API_KEY from '../../../api'
export default {
  mixins: [tableMixin],
  data () {
    return {
      columns, // 表格列字段
      params: { // 搜索条件
        rfRuralName: '',
        statisticsYear: ''
      },
      action: { // 接口api地址
        readParty: API_KEY.ruralInfo.page // 分页查询地址
        // 根据关键字删除接口（如果使用混入，属性名不能变,存放位置不能变）
        // removeDataByKey: ''
      },
      prefix: '农村党支部信息',
      idName: 'id', // 主键字段名
      id: '' // 主键值
    }
  },
  components: {
    ruralPartyBranchUpdate: () => import('./ruralPartyBranchUpdate')
  },
  methods: {

  }
}
</script>

<style scoped="scoped" lang="scss">
  /deep/ .ivu-select-dropdown{
    color: #000 !important;
  }
</style>
